<?php
	function showRegister(){
	
		//-----------------------------------------//	
		$userfile_1     	= $_FILES['cmnd_1']['tmp_name'];
		$file_name_1	= $_FILES['cmnd_1']['name'];
		
		$upfile_date_1	=	substr(mt_rand(),0,4);
		$userfile_name_1	=	$upfile_date_1."_".$file_name_1;
		$upfile_1 		= 	_upload_path.$userfile_name_1;
		move_uploaded_file($userfile_1,$upfile_1);
		//-----------------------------------------//
		
		//-----------------------------------------//	
		$userfile_2     	= $_FILES['cmnd_2']['tmp_name'];
		$file_name_2	= $_FILES['cmnd_2']['name'];
		
		$upfile_date_2	=	substr(mt_rand(),0,4);
		$userfile_name_2	=	$upfile_date_2."_".$file_name_2;
		$upfile_2 		= 	_upload_path.$userfile_name_2;
		move_uploaded_file($userfile_2,$upfile_2);
		//-----------------------------------------//
		
		$type_register = $_POST['type_register'];
		$email = $_POST['email'];
		$password = $_POST['password'];
		$confirmpass = $_POST['confirmpass'];
		$username = $_POST['username'];
		$firstname = $_POST['firstname'];
		$lastname = $_POST['lastname'];
		$sex = $_POST['sex'];
		$day = $_POST['day'];
		$month = $_POST['month'];
		$year = $_POST['year'];
		$cmnd_1 = $_POST['cmnd_1'];
		$cmnd_2 = $_POST['cmnd_2'];
		$phone = $_POST['phone'];
		$address = $_POST['address'];
		$country = $_POST['country'];
		if(isset($email)){
			$sql = "insert into vt_register(type_register,email,password,confirmpass,username,firstname,lastname,sex,day,month,year,cmnd_1,cmnd_2,phone,address,country) values('".$type_register."','".$email."','".md5($password)."','".md5($confirmpass)."','".$username."','".$firstname."','".$lastname."','".$sex."','".$day."','".$month."','".$year."','".$userfile_name_1."','".$userfile_name_2."','".$phone."','".$address."','".$country."')";
			$rs = mysql_query($sql);
		}
	}
?>